package server;


import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;

public class RmiServer{
	public static void main(String[] argv){
		try  
	      {   
	         LocateRegistry.createRegistry(1099);   
	         
	   //      RemoteInterface remoteInterface = new RemoteMethod();   
	 //        Naming.rebind("RemoteInterface", remoteInterface);   
	         

				ResMenuInterface menu= new ResMenuList();
				Naming.rebind("ResMenuList",menu);
				
				ResDinnerInterface dinner= new ResDinnerInfo();
				Naming.rebind("ResDinnerInfo",dinner);
				
				ResBookInterface book= new ResBookInfo();
				Naming.rebind("ResBookInfo",book);
				
				ResTakeOutInterface takeOut= new ResTakeOutInfo();
				Naming.rebind("ResTakeOutInfo",takeOut);

				
				ResStaffInterface staff= new ResStaffList();
				Naming.rebind("ResStaffList",staff);
				
				ResWaiterInterface waiter=new ResWaiter(0);
				Naming.rebind("ResWaiter",waiter);
				
				ResCustomerInterface customer=new ResCustomer();
				Naming.rebind("ResCustomer", customer);
				
				ResTableInterface table=new ResTable();
				Naming.rebind("ResTable", table);
				

				
				
				
				

				EnterpriceInterface EI=new Enterprise();
				Naming.rebind("Enterprice", EI);
				CompanyInterface CI=new Company();
				Naming.rebind("Company", CI);
				InvestComInterface ICI=new InvestCom();
				Naming.rebind("InvestCom", ICI);
				DeveComInterface DCI=new DevelopCom();
				Naming.rebind("DeveCom", DCI);
				SaleComInterface SCI=new SaleCom();
				Naming.rebind("SaleCom", SCI);
				StaffInterface SI=new Staff();
				Naming.rebind("Staff", SI);
				

				ComHouseInterface comHouse = new ComHouseList();
				Naming.rebind("ComHouseList", comHouse);
				ComActionInterface comAction = new ComActionList();
				Naming.rebind("ComActionList", comAction);
				ComBuyInterface comBuy = new ComBuyList();
				Naming.rebind("ComBuyList", comBuy);
				ComPropertyInterface comProperty = new ComProperty();
				Naming.rebind("ComProperty", comProperty);

				PersonInterface person=new Person();
				Naming.rebind("Person",person);

				



				SubwayInterface sub = new Subway();
				Naming.rebind("Subway", sub);
				LocationInterface loc = new Location();
				Naming.rebind("Location", loc);
				
				EntertainInterface ei = new EntertainmentSettling();
				Naming.rebind("EntertainmentSettling", ei);


				BkCAccITF CAitf = new BankCurrentAccount();
              	Naming.rebind("BankCurrentAccount", CAitf);
              	BkFAccITF FAitf = new BankFixedAccount();
              	Naming.rebind("BankFixedAccount",FAitf);
              	BkLAccITF LAitf = new BankLoanAccount();
              	Naming.rebind("BankLoanAccount",LAitf);
              	BkStfITF Sitf = new BankStaff();
              	Naming.rebind("BankStaff",Sitf);
              	BkMngITF Mitf = new BankManager();
              	Naming.rebind("BankManager",Mitf);
              	BkWatITF Witf = new BankWanter();
              	Naming.rebind("BankWanter",Witf);






	         //Naming.rebind("//192.168.1.105:1099/Hello",hello);      
	      }   
	      catch (Exception e)   
	      {   
	         System.out.println("Rmi Server failed: " + e);   
	      }   
	}
	
}